<template>
  <div>
    <el-button @click="fetchUserData">获取所有用户</el-button>
    <el-button type="default" @click="addUser">添加用户</el-button>
  </div>
</template>

<script lang='ts' setup>
import {findAllUserApi,addUserApi} from "@/apis/userApi"

const fetchUserData =async ()=>{
  const res = await findAllUserApi({pageSize:5,pageNum:1,deptId:1})
  console.log(res)
}

const addUser =async ()=>{
  const user = {
    username:"xiaofeifei2",
    password:"1234qwer",
    roleId:"1",
    status:"1",
    ssex:"0",
    email:"18628317778@sina.cn",
    mobile:"18628317778",
    deptId:1
  }
  const res = await addUserApi(user)
  console.log(res);
  
}
</script>

<style lang='scss' scoped>
</style>